/*
 NSArrayAdditions.h
 MailDelivery
 
 Created by Dante Palacios on 30/08/09.
 Copyright 2009 Dante Palacios. All rights reserved.
 */

/*!
 @header NSArrayAdditions.h
 @discussion This header contains some utility methods for the framework. Some of these methods may disappear or change their names without prior notice. For more information, contact palacios.dante\@gmail.com.
 */

#import <Foundation/Foundation.h>

/*!
 @category NSArray(NSArrayMailDeliveryAdditions)
 @abstract Additions to the class NSDictionary.
 @discussion Used by framework to get message properties.
 */

@interface NSArray(NSArrayMailDeliveryAdditions)

/*!
 @method arrayByExtractingAddressesFromArray:validate:
 @discussion Used by the framework to include only strings that contains email addresses.
 @param shouldValidateAddresses
 yes if you want to validate the email addresses.
 */

+ (NSArray *)arrayByExtractingAddressesFromArray:(NSArray *)array validate:(BOOL)shouldValidateAddresses;

/*!
 @method arrayByExtractingAddresses
 @discussion As in @link arrayByExtractingAddressesFromArray:validate: arrayByExtractingAddressesFromArray:validate: @/link, passing NO as option.
 */

- (NSArray *)arrayByExtractingAddresses;

/*!
 @method componentsJoinedAsRecipients
 @discussion @textblock returns a CRLF separated list of addresses using the format \@"RCPT TO:<email>. E.g \@"RCPT TO:<janedoe@example.com>\r\nRCPT TO:<jdoe@example.com>\r\n. Objects must respond to selector "address". @/textblock
 */

- (NSString *)componentsJoinedAsRecipients;

@end